/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.api.wrapper.customer.customerinfo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.opsli.api.base.warpper.ApiWrapper;
import org.opsli.common.annotation.validator.Validator;
import org.opsli.common.annotation.validator.ValidatorLenMax;
import org.opsli.common.enums.ValidatorType;
import org.opsli.plugins.excel.annotation.ExcelInfo;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 客户信息 Model
 *
 * @author 17607080935
 * @date 2025-06-28 23:58:14
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CustomersInfoModel extends ApiWrapper {

    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    @ExcelProperty(value = "姓名", order = 0)
    @ExcelInfo
    @Validator({
            ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(50)
    private String name;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    @ExcelProperty(value = "性别", order = 1)
    @ExcelInfo(dictType = "customer_sex")
    @ValidatorLenMax(1)
    private String gender;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    @ExcelProperty(value = "手机号", order = 2)
    @ExcelInfo
    @Validator({
            ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(12)
    private String phone;

    /**
     * openid
     */
    @ApiModelProperty(value = "openid")
    @ExcelProperty(value = "openid", order = 3)
    @ExcelInfo
    @ValidatorLenMax(20)
    private String wechatOpenid;

    /**
     * unionid
     */
    @ApiModelProperty(value = "unionid")
    @ExcelProperty(value = "unionid", order = 4)
    @ExcelInfo
    @ValidatorLenMax(20)
    private String wechatUnionid;

    /**
     * email
     */
    @ApiModelProperty(value = "email")
    @ExcelProperty(value = "email", order = 5)
    @ExcelInfo
    @ValidatorLenMax(50)
    private String email;

    /**
     * 身份证
     */
    @ApiModelProperty(value = "身份证")
    @ExcelProperty(value = "身份证", order = 6)
    @ExcelInfo
    @ValidatorLenMax(20)
    private String idCard;

    /**
     * 住址
     */
    @ApiModelProperty(value = "住址")
    @ExcelProperty(value = "住址", order = 7)
    @ExcelInfo
    @ValidatorLenMax(220)
    private String address;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    @ExcelProperty(value = "头像", order = 8)
    @ExcelInfo
    @ValidatorLenMax(220)
    private String avatar;


    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @ExcelProperty(value = "备注", order = 12)
    @ExcelInfo
    private String remark;


    /**
     * 最后登录时间
     */
    @ApiModelProperty(value = "最后登录时间")
    @ExcelProperty(value = "最后登录时间", order = 14)
    @ExcelInfo
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTime;

    /**
     * 父级主键集合
     */
    @ApiModelProperty(value = "父级主键集合")
    @ExcelProperty(value = "父级主键集合", order = 16)
    @ExcelInfo
    @ValidatorLenMax(500)
    private String orgIds;


}